


clear all 
use the_dataset.dta

keep if  dataset_heterogeneity == 1

global covariates3 culture1 educ_basic1-educ_sup1 age051-age661 income1 NMIEMB1 size_dummy1-size_dummy5 number_spanish1 ccaadummy1-ccaadummy17 yeardummy1-yeardummy9

gen     c_c1 = 1 if culture1 > 0
* gender 
gen     c_c2f = 1 if culture2 >  0 & (case_1g==1 & case_1 ==1)
replace c_c2f = 0 if culture2 == 0 & (case_1g==1 & case_1 ==1)

gen     c_c2m = 1 if culture2 >  0 & (case_2g==1 & case_1 ==1)
replace c_c2m = 0 if culture2 == 0 & (case_2g==1 & case_1 ==1)

* educ 
gen     c_c2l = 1 if culture2 >  0 & (case_1e==1 & case_1 ==1)
replace c_c2l = 0 if culture2 == 0 & (case_1e==1 & case_1 ==1)

gen     c_c2h = 1 if culture2 >  0 & (case_2e==1 & case_1 ==1)
replace c_c2h= 0 if culture2 == 0 & (case_2e==1 & case_1 ==1)

* Female, T01
preserve
keep if case_1g==1 & case_1 ==1
* Unconditional
absdid culture_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
absdid income_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
* Cop
absdid c_c2f, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
keep if c_c2f == 1
absdid culture_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
absdid income_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
restore

* Male, T01
preserve
keep if case_2g==1 & case_1 ==1
* Unconditional
absdid culture_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
absdid income_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
* Cop
absdid c_c2m, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
keep if c_c2m == 1
absdid culture_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
absdid income_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
restore

* EDUCATION

* Low educ, t01
preserve
keep if case_1e==1 & case_1 ==1
* Unconditional
absdid culture_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
absdid income_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
* Cop
absdid c_c2l, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
keep if c_c2l == 1
absdid culture_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
absdid income_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
restore

* High educ, t01
preserve
keep if case_2e==1 & case_1 ==1
* Unconditional
absdid culture_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
absdid income_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
* Cop
absdid c_c2h, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
keep if c_c2h == 1
absdid culture_d, tvar(unemp) xvar($covariates3) sle 
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean))
absdid income_d, tvar(unemp) xvar($covariates3) sle
sum unemp if e(sample)==1
dis "treated=" r(N)*r(mean)
dis "untreated=" r(N)*(1-r(mean)) 
restore




